//
// Created by LoveHoneyYou on 2024-11-18.
//

#ifndef WEBSERVER_TCPCONNECTION_H
#define WEBSERVER_TCPCONNECTION_H

#include "Buffer.h"
#include "Channel.h"
#include "EventLoop.h"
#include "HttpRequest.h"


class TcpConnetion
{
public:
    TcpConnetion(int fd,EventLoop* eventloop);
    ~TcpConnetion();

    static int Process_Read(void* arg);
    static int Process_Write(void* arg);
    static int Destroy(void* arg);

private:
    std::string name_;
    EventLoop* event_loop_;
    Channel* channel_;
    Buffer* readbuf_;
    Buffer* writebuf_;

    HttpRequest* request_;
    HttpResponse* response_;
};




#endif//WEBSERVER_TCPCONNECTION_H
